using System;
using ZhCun.DbCore.Entitys;

namespace ZhCun.DBModel
{
	public partial class Sys_User : EntityBase
	{
		private System.String _Id;
		/// <summary>
		/// Id
		/// </summary>
		[Entity(ColumnName = CNId, IsPrimaryKey = true, IsNotNull = true)]
		public System.String Id
		{
			get { return _Id; }
			set
			{
				_Id = value;
				base.SetFieldChanged(CNId) ;
			}
		}

		private System.String _UserName;
		/// <summary>
		/// UserName
		/// </summary>
		[Entity(ColumnName = CNUserName, IsNotNull = true)]
		public System.String UserName
		{
			get { return _UserName; }
			set
			{
				_UserName = value;
				base.SetFieldChanged(CNUserName) ;
			}
		}

		private System.String _MobileNumber;
		/// <summary>
		/// MobileNumber
		/// </summary>
		[Entity(ColumnName = CNMobileNumber)]
		public System.String MobileNumber
		{
			get { return _MobileNumber; }
			set
			{
				_MobileNumber = value;
				base.SetFieldChanged(CNMobileNumber) ;
			}
		}

		private System.String _LoginName;
		/// <summary>
		/// LoginName
		/// </summary>
		[Entity(ColumnName = CNLoginName, IsNotNull = true)]
		public System.String LoginName
		{
			get { return _LoginName; }
			set
			{
				_LoginName = value;
				base.SetFieldChanged(CNLoginName) ;
			}
		}

		private System.String _LoginPwd;
		/// <summary>
		/// LoginPwd
		/// </summary>
		[Entity(ColumnName = CNLoginPwd, IsNotNull = true)]
		public System.String LoginPwd
		{
			get { return _LoginPwd; }
			set
			{
				_LoginPwd = value;
				base.SetFieldChanged(CNLoginPwd) ;
			}
		}

		private System.Int32 _LoginCount;
		/// <summary>
		/// LoginCount
		/// </summary>
		[Entity(ColumnName = CNLoginCount, IsNotNull = true)]
		public System.Int32 LoginCount
		{
			get { return _LoginCount; }
			set
			{
				_LoginCount = value;
				base.SetFieldChanged(CNLoginCount) ;
			}
		}

		private System.DateTime? _LastLoginTime;
		/// <summary>
		/// LastLoginTime
		/// </summary>
		[Entity(ColumnName = CNLastLoginTime)]
		public System.DateTime? LastLoginTime
		{
			get { return _LastLoginTime; }
			set
			{
				_LastLoginTime = value;
				base.SetFieldChanged(CNLastLoginTime) ;
			}
		}

		private System.String _LastLoginHost;
		/// <summary>
		/// LastLoginHost
		/// </summary>
		[Entity(ColumnName = CNLastLoginHost)]
		public System.String LastLoginHost
		{
			get { return _LastLoginHost; }
			set
			{
				_LastLoginHost = value;
				base.SetFieldChanged(CNLastLoginHost) ;
			}
		}

		private System.Int32 _OnLineCount;
		/// <summary>
		/// OnLineCount
		/// </summary>
		[Entity(ColumnName = CNOnLineCount, IsNotNull = true)]
		public System.Int32 OnLineCount
		{
			get { return _OnLineCount; }
			set
			{
				_OnLineCount = value;
				base.SetFieldChanged(CNOnLineCount) ;
			}
		}

		private System.String _RoleId;
		/// <summary>
		/// RoleId
		/// </summary>
		[Entity(ColumnName = CNRoleId, IsNotNull = true)]
		public System.String RoleId
		{
			get { return _RoleId; }
			set
			{
				_RoleId = value;
				base.SetFieldChanged(CNRoleId) ;
			}
		}

		private System.Boolean _IsManage;
		/// <summary>
		/// IsManage
		/// </summary>
		[Entity(ColumnName = CNIsManage, IsNotNull = true)]
		public System.Boolean IsManage
		{
			get { return _IsManage; }
			set
			{
				_IsManage = value;
				base.SetFieldChanged(CNIsManage) ;
			}
		}

		private System.Boolean _IsValid;
		/// <summary>
		/// IsValid
		/// </summary>
		[Entity(ColumnName = CNIsValid, IsNotNull = true)]
		public System.Boolean IsValid
		{
			get { return _IsValid; }
			set
			{
				_IsValid = value;
				base.SetFieldChanged(CNIsValid) ;
			}
		}

		private System.DateTime? _AddTime;
		/// <summary>
		/// AddTime
		/// </summary>
		[Entity(ColumnName = CNAddTime)]
		public System.DateTime? AddTime
		{
			get { return _AddTime; }
			set
			{
				_AddTime = value;
				base.SetFieldChanged(CNAddTime) ;
			}
		}

		private System.String _AddUserId;
		/// <summary>
		/// AddUserId
		/// </summary>
		[Entity(ColumnName = CNAddUserId)]
		public System.String AddUserId
		{
			get { return _AddUserId; }
			set
			{
				_AddUserId = value;
				base.SetFieldChanged(CNAddUserId) ;
			}
		}

		private System.String _AddHost;
		/// <summary>
		/// AddHost
		/// </summary>
		[Entity(ColumnName = CNAddHost)]
		public System.String AddHost
		{
			get { return _AddHost; }
			set
			{
				_AddHost = value;
				base.SetFieldChanged(CNAddHost) ;
			}
		}

		#region 字段名的定义
		public const string CNId = "Id";
		public const string CNUserName = "UserName";
		public const string CNMobileNumber = "MobileNumber";
		public const string CNLoginName = "LoginName";
		public const string CNLoginPwd = "LoginPwd";
		public const string CNLoginCount = "LoginCount";
		public const string CNLastLoginTime = "LastLoginTime";
		public const string CNLastLoginHost = "LastLoginHost";
		public const string CNOnLineCount = "OnLineCount";
		public const string CNRoleId = "RoleId";
		public const string CNIsManage = "IsManage";
		public const string CNIsValid = "IsValid";
		public const string CNAddTime = "AddTime";
		public const string CNAddUserId = "AddUserId";
		public const string CNAddHost = "AddHost";
		#endregion

	}
}
